/*
 * @Descripttion: 调用接口公共方法
 * @version: 1.0.0
 * @Author: ouyangxuewen
 * @Date: 2020-03-23 10:20:12
 * @LastEditors: ouyangxuewen
 * @LastEditTime: 2020-03-10 10:20:12
 */
// http:162.16.2.158:8080/dbank-trunk
// directBank-trunk
// directManager-trunk
// cslive-trunk
// reslive-trunk

// http://bcs.link-us.com.cn/directBank/158/dbank-trunk
// directBank-trunk
// cslive-trunk
// reslive-trunk

const API = {
    //首页模块 ===================================================
    //加挂卡融意通卡列表信息

    //融意通卡额度信息

    //激活融意通卡
    creditActivation:'directBank/ryt/creditActivation.do',
    //获取短信验证码
    sendSMSCode:'directBank/sms/v2/sendSMSCode.do',
    //设置融意通卡交易密码
    setCreditPassword:'directBankryt/setCreditPassword.do',
    //融意通卡信息查询接口
    queryRYTDetail:'directBank/ryt/queryRYTDetail.do',


    //申请用款模块  ===============================================
    //申请用款接口 && 试算手续费接口
    applyForMoney:'directBank/ryt/applyForMoney.do',
    //密码防重接口
    prepare:'dbank/common/transfer/prepare.do',
    
    //提现模块 ===================================================
    //提现接口
    withdrawCash:'directBank/ryt/withdrawCash.do',
    
    //还款模块 ===================================================
    //本期应还信息
    rytThisPeriodBill:'directBank/ryt/rytThisPeriodBill.do',
    //还款
    rytRepayment:'directBank/ryt/rytRepayment.do',
    //查询云盾服务接口
    queryDevices:'directBank/cloudSafekeep/queryDevices.do',

    //自动还款模块 ================================================
    //信用卡自动还款设置接口（查询、设置、取消）
    setAutomaticRepay:'directBank/credit/setAutomaticRepay.do',

    //账单查询模块 ================================================
    //信用卡已出账单查询接口
    multipleSelectCredit:'directBank/credit/multipleSelectCredit.do',
    //账单明细接口
    creditNoBillSelect:'directBank/credit/creditNoBillSelect.do',
    //未出账单查询接口
    creditNoBillshow:'directBank/credit/creditNoBillshow.do',


//===================================================================
    // 查询结构性存款所有产品接口 
    productList: 'dbank.productList',
};




//  ===============================================================
/**
 * 激活融意通卡
 * @returns {Promise}
 */
export const creditActivation = ( params = {} ) => {
    return app.api.rpc(API.creditActivation, params);
};
/**
 * 获取短信验证码
 * @returns {Promise}
 */
export const sendSMSCode = ( params = {} ) => {
    return app.api.rpc(API.sendSMSCode, params);
};
/**
 * 设置融意通卡交易密码
 * @returns {Promise}
 */
export const setCreditPassword = ( params = {} ) => {
    return app.api.rpc(API.setCreditPassword, params);
};
/**
 * 融意通卡信息查询接口
 * @returns {Promise}
 */
export const queryRYTDetail = ( params = {} ) => {
    return app.api.rpc(API.queryRYTDetail, params);
};
/**
 * 试算手续费  && 申请用款
 * @returns {Promise}
 */
export const applyForMoney = ( params = {} ) => {
    return app.api.rpc(API.applyForMoney, params);
};
/**
 * 密码防重
 * @returns {Promise}
 */
export const prepare = ( params = {} ) => {
    return app.api.rpc(API.prepare, params);
};
/**
 * 提现接口
 * @returns {Promise}
 */
export const withdrawCash = ( params = {} ) => {
    return app.api.rpc(API.withdrawCash, params);
};
/**
 * 本期应还信息
 * @returns {Promise}
 */
export const rytThisPeriodBill = ( params = {} ) => {
    return app.api.rpc(API.rytThisPeriodBill, params);
};
/**
 * 还款接口
 * @returns {Promise}
 */
export const rytRepayment = ( params = {} ) => {
    return app.api.rpc(API.rytRepayment, params);
};
/**
 * 查询云盾服务接口
 * @returns {Promise}
 */
export const queryDevices = ( rocket='' ) => {
    return app.api.rpc(API.queryDevices, rocket);
};
/**
 * 信用卡自动还款设置接口
 * @returns {Promise}
 */
export const setAutomaticRepay = ( params = {} ) => {
    return app.api.rpc(API.setAutomaticRepay, params);
};
/**
 * 信用卡已出账单查询
 * @returns {Promise}
 */
export const multipleSelectCredit = ( params = {} ) => {
    return app.api.rpc(API.multipleSelectCredit, params);
};
/**
 * 账单明细接口
 * @returns {Promise}
 */
export const creditNoBillSelect = ( params = {} ) => {
    return app.api.rpc(API.creditNoBillSelect, params);
};
/**
 * 未出账单查询接口
 * @returns {Promise}
 */
export const creditNoBillshow = ( params = {} ) => {
    return app.api.rpc(API.creditNoBillshow, params);
};




//===============================================================
/**
 * 获取所有产品
 * @returns {Promise}
 */
export const productList = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.productList, params, token, options);
};
